<!--
 * @Description: 管理员的书籍管理页面，书籍的增删查改
 * @Author: tyq
 * @Date: 2021-02-21 15:56:47
 * @LastEditors: zy
 * @LastEditTime: 2021-06-14 22:50:07
-->
<template>
    <div class="total">
      <div class="select">
        <el-select v-model="value" placeholder="学院" size="small" style="margin-left:50px">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>
   <el-select v-model="value" placeholder="年级" size="small" style="margin-left:70px">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>
   <el-select v-model="value" placeholder="学期" size="small" style="margin-left:70px">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
        </el-select>
      </div>
      <div class="table">
        <el-table
            border
            stripe
            size="small"
            :data="book"
            style="width: 87%;margin-top: 20px">
            <el-table-column
              prop="id"
              label="序号"
              width="90">
            </el-table-column>
            <el-table-column
              prop="subjectName"
              label="课程名称"
              width="200">
            </el-table-column>
            <el-table-column
              prop="teacherName"
              label="教师"
              width="200">
            </el-table-column>
            <el-table-column
              show-overflow-tooltip
              prop="aveScore"
              label="评分"
              width="200">
            </el-table-column>
            <el-table-column
              show-overflow-tooltip
              prop="assNum"
              label="评分人数"
              width="200">
            </el-table-column>
            <el-table-column
              label="操作">
              <template slot-scope="scope">
                <el-button
                  size="mini"
                  @click="showEditView(scope.$index, scope.row)">查看详情</el-button>
              </template>
            </el-table-column>
          </el-table>
           </div>
    </div>
</template>
<script>

export default {
  name: 'Book',
  data () {
    return {
      pos: {
        id: '',
        subjectName: '',
        teacherName: '',
        aveScore: '',
        assNum: ''
      },
      total: []
    }
  },
  components: {
  },
  mounted () {
    this.initTotal()
  },
  methods: {
    initTotal () {
      
    },
    showEditView (index, data) {
      this.$http({
        methods: 'get',
        url: 'subject/findId',
        params: {
          'id': data.id
        },
        Headers: {
          // 'token': window.localStorage.getItem('token')
        }
      }).then(res => {
        console.log(res.data.data)
      })
    }
  }
}
</script>
<style>
 .total {
   margin-top: 10px;
 }
</style>
